package com.dahouzi.web.hometown;

import javax.annotation.security.PermitAll;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.dahouzi.dao.entity.TArticle;
import com.dahouzi.service.TArticleService;

@Controller
@PermitAll
@RequestMapping("/hometown")
public class HometownCtrl {
	@Autowired
	private TArticleService tArticleService;

	@RequestMapping("")
	public String index() {

		TArticle art=new TArticle();
		art.setAuthor("lgl");
		tArticleService.insert(art);
		return "table/hometown/index";
	}

	@RequestMapping("/")
	public String index_() {
		return "table/hometown/index";
	}

}
